
public class Stack {
	public class Node{
		int data;
		Node next;
		public  Node(int data){
			this.data=data;
		}
	}
	Node top;
	public Node pop(){
		if(top!=null){
			Node pop = top;
			top=top.next;
			return pop;
		}
		return null;
	}
	public void push(int data){
		Node push = new Node(data);
		push.next=top;
		top = push;
	}
	public Node peek(){
		return top;
	}
}


